import { Module } from '@nestjs/common'
import { BarService } from './bar.service'
import { BarController } from './bar.controller'
import { MongooseModule } from '@nestjs/mongoose'
import { Bar, BarSchema } from '../model/bar.schema'
import { SubBar, subBarSchema } from '../model/subBar.schema'
import { UserModule } from '../user/user.module'

import { Proposition, PropositionSchema } from '../model/proposition.schema'
import { PropositionModule } from '../proposition/proposition.module'
@Module({
  imports: [
    MongooseModule.forFeature([
      { name: Bar.name, schema: BarSchema },
      { name: SubBar.name, schema: subBarSchema },
      { name: Proposition.name, schema: PropositionSchema },
    ]),
    UserModule,
    PropositionModule,
  ],
  controllers: [BarController],
  providers: [BarService],
  exports: [
    BarService,
    MongooseModule.forFeature([
      { name: Bar.name, schema: BarSchema },
      { name: SubBar.name, schema: subBarSchema },
    ]),
  ],
})
export class BarModule {}
